/*
 * @Description: 实体消息对象
 * @Author: Wenguang Song
 * @Date: 2022-04-29 16:02
 * @LastEditors: Wenguang Song
 * @LastEditTime: 2022-05-05 09:14
 * @FilePath: /call_service/src/common/models/MessageEntity.js
 */
class Message {
  constructor(options) {
    this.id = options.id
    this.touser = options.touser //接受者
    this.agentNo = options.agentNo // 坐席编号
    this.createtime = options.createtime || Date.now()
    this.direction = options.direction // 消息方向
    this.msgtype = options.msgtype // 消息类型
    this.content = options.content // 消息类型
    this.imageUri = options.imageUri || '' // 图片消息地址
    this.pic = options.pic || '' // 预览图
  }

  // 设置消息内容
  setContent(content, imageUri) {
    this.content = content
    this.imageUri = imageUri
  }
}
